#include "Debug.h"

std::vector<int> Debug::list = std::vector<int>();

Debug::Debug(void)
{
}


Debug::~Debug(void)
{
}

void Debug::show(CCNode * node)
{
	int len = list.size();
	for (int n = 0 ; n<len ; n++ )
	{
		if (list[n] == node->m_uID)
		{
			return;
		}
	}

	list.push_back(node->m_uID);
	
	int r = getRand(0, 255);
	int g = getRand(0, 255);
	int b =  getRand(0, 255);

	CCLayerColor * clc = CCLayerColor::create(ccc4(r, g, b ,100));
	clc->setContentSize(node->getContentSize());
	node->addChild(clc);
}

int Debug::getRand(int start, int end )
{
	int r = rand()%(end-start+1)+start;
	return r;
}

